﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace BLL.Models
{
    public class MMsgModels
    {
        /// <summary>
        /// 新加一条消息
        /// </summary>
        /// <returns></returns>
        public bool AddMsg(string userid,string content) {

            bool ret = false;
            string str_sql = "insert into [tb_mc_msg] (userid,content,addDtate) values ( " + userid + ",'" + content + "' ,'" + DateTime.Now.ToString() + "'  )";
            Library.SqlProvider.OleDb db = new Library.SqlProvider.OleDb();
            try
            {
                db.ExecuteNonQuery(COMM.PucConfig.ConnectionStringA, CommandType.Text, str_sql);
                ret = true;
            }
            catch (Exception ex) { }
            return ret;
        }
    }
}
